package com.fml.ft_study.service;
import com.fml.ft_study.dao.MenuDAO;
import com.fml.ft_study.domain.menu;

import java.util.List;

public class MenuService {
    private MenuDAO menuDAO=new MenuDAO();
    public List<menu>listMenu(){

        return menuDAO.queryMulti("SELECT * FROM menu;",menu.class);
    }
    //根据菜品的ID来获取Menu对象
    public  menu MenuById(int meunId){
        return menuDAO.querySingle("SELECT * FROM `menu` WHERE id=?",menu.class,meunId);
    }

}
